package ua.openmedis.web.test;

import java.util.ArrayList;
import java.util.List;

import javax.faces.model.SelectItem;

public class DeviceUtils {
	private static String[] categories =
    {  "Java", "JavaScript", "C#", "C++", "PHP", "Python", "Perl", "Ruby", "Scala" };
	private static String[] manufacturers =
    { "Java", "JavaScript", "C#", "C++", "PHP", "Python", "Perl", "Ruby", "Scala" };
	private static Integer[] lifetimes =
    { 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19};
	private static String[] fundings =
    { "Java", "JavaScript", "C#", "C++", "PHP", "Python", "Perl", "Ruby", "Scala" };
	private static String[] suppliers =
    { "Java", "JavaScript", "C#", "C++", "PHP", "Python", "Perl", "Ruby", "Scala" };
	private static String[] warranties =
    { "Java", "JavaScript", "C#", "C++", "PHP", "Python", "Perl", "Ruby", "Scala" };
	private static String[] serviceAgents =
    { "Java", "JavaScript", "C#", "C++", "PHP", "Python", "Perl", "Ruby", "Scala" };
	private static String[] technicians =
    { "Java", "JavaScript", "C#", "C++", "PHP", "Python", "Perl", "Ruby", "Scala" };
	private static String[] locations =
    { "Java", "JavaScript", "C#", "C++", "PHP", "Python", "Perl", "Ruby", "Scala" };
	private static String[] statuses =
    { "Java", "JavaScript", "C#", "C++", "PHP", "Python", "Perl", "Ruby", "Scala" };
	private static String[] utilizations =
    { "Java", "JavaScript", "C#", "C++", "PHP", "Python", "Perl", "Ruby", "Scala" };
	
	private static List<SelectItem> availableCategories;
	private static List<SelectItem> availableManufacturers;
	private static List<SelectItem> availableLifetime;
	private static List<SelectItem> availableFunding;
	private static List<SelectItem> availableSuppliers;
	private static List<SelectItem> availableWarranties;
	private static List<SelectItem> availableServiceAgents;
	private static List<SelectItem> availableTechnicians;
	private static List<SelectItem> availableLocation;
	private static List<SelectItem> availableStatuses;
	private static List<SelectItem> availableUtilizationTypes;
	
	public static List<SelectItem> categoriesList() {
	    return(availableCategories);
	  }
	
	public static List<SelectItem> manufacturesList() {
	    return(availableManufacturers);
	  }
	
	public static List<SelectItem> lifetimeList() {
	    return(availableLifetime);
	  }
	public static List<SelectItem> fundingList() {
	    return(availableFunding);
	  }
	
	public static List<SelectItem> supplierList() {
	    return(availableSuppliers);
	  }
	public static List<SelectItem> warrantyList() {
	    return(availableWarranties);
	  }
	public static List<SelectItem> technicianList() {
	    return(availableTechnicians);
	  }
	public static List<SelectItem> serviceAgentList() {
	    return(availableServiceAgents);
	  }
	public static List<SelectItem> locationList() {
	    return(availableLocation);
	  }
	public static List<SelectItem> statusList() {
	    return(availableStatuses);
	  }
	public static List<SelectItem> utilizationList() {
	    return(availableUtilizationTypes);
	  }
	
	 static {
		 availableCategories = new ArrayList<SelectItem>();
		 for(String category: categories) {
			 availableCategories.add(new SelectItem(category));
		    }
		 availableManufacturers = new ArrayList<SelectItem>();
		 for(String manufacture: manufacturers) {
			 availableManufacturers.add(new SelectItem(manufacture));
		    }
		 availableLifetime = new ArrayList<SelectItem>();
		 for(int lifetime: lifetimes) {
			 availableLifetime.add(new SelectItem(lifetime));
		    }
		 availableFunding = new ArrayList<SelectItem>();
		 for(String funding: fundings) {
			 availableFunding.add(new SelectItem(funding));
		    }
		 availableSuppliers = new ArrayList<SelectItem>();
		 for(String supplier: suppliers) {
			 availableSuppliers.add(new SelectItem(supplier));
		    }
		 availableWarranties = new ArrayList<SelectItem>();
		 for(String warranty: warranties) {
			 availableWarranties.add(new SelectItem(warranty));
		    }
		 availableServiceAgents = new ArrayList<SelectItem>();
		 for(String serviceAgent: serviceAgents) {
			 availableServiceAgents.add(new SelectItem(serviceAgent));
		    }
		 availableTechnicians = new ArrayList<SelectItem>();
		 for(String technician: technicians) {
			 availableTechnicians.add(new SelectItem(technician));
		    }
		 availableLocation = new ArrayList<SelectItem>();
		 for(String location: locations) {
			 availableLocation.add(new SelectItem(location));
		    }
		 availableStatuses = new ArrayList<SelectItem>();
		 for(String status: statuses) {
			 availableStatuses.add(new SelectItem(status));
		    }
		 availableUtilizationTypes = new ArrayList<SelectItem>();
		 for(String utilization: utilizations) {
			 availableUtilizationTypes.add(new SelectItem(utilization));
		    }
	 }

}
